# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-apscheduler
_pkgname=${pkgname#python-}
pkgver=3.11.0
pkgrel=1
pkgdesc='In-process task scheduler with Cron-like capabilities,'
url='https://github.com/agronholm/apscheduler'
license=('MIT')
arch=('any')
depends=('python-setuptools' 'python-six' 'python-pytz' 'python-tzlocal')
makedepends=('git' 'python-build' 'python-pip')
source=("git+https://github.com/agronholm/apscheduler.git#tag=$pkgver")
sha512sums=('fda0a717cd1efd0c2e32f19a50c4033bfe8198e9f412ee51ff0ae455ddffbd931d5d68ec568d0997b30d05559410cf4504b6a05f1c7889f19fd604fa70b3ef6f')

build() {
  cd $_pkgname

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd $_pkgname

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

